#include "spinboxwidget.h"
#include "../../../controls/include/controls/spinbox/cxispinbox.h"
#include "ui_SpinBoxWidget.h"
#include <QtWidgets/QDoubleSpinBox>
#include <QtWidgets/QMessageBox>

SpinBoxWidget::SpinBoxWidget(QWidget* parent) : QWidget(parent), ui(new Ui::SpinBoxWidget)
{
	ui->setupUi(this);
	init();
}

SpinBoxWidget::~SpinBoxWidget()
{
	delete ui;
}

void SpinBoxWidget::init()
{
	connect(ui->cxiSpinBox_2, &CxiSpinBox::valueChanged, this, [=](QVariant value) {
		ui->label->setText(QString::number(value.toDouble(),'g'));
	});
	connect(ui->pushButton, &QPushButton::clicked, [=]() {
		QMessageBox::information(this, "提示", "点击了按钮");
	});
}
